package com.structure.compositePattern.model.aggregates;

import com.structure.compositePattern.model.vo.TreeNode;
import com.structure.compositePattern.model.vo.TreeRoot;
import lombok.Data;

import java.util.Map;

/**
 * 聚合对象，包含组织树信息
 * 规则树聚合
 *
 * @author xiaobing
 * @version 1.0
 * @date 2021/9/8 8:07 下午
 */
@Data
public class TreeRich {

    /**
     * 树根信息
     */
    private TreeRoot treeRoot;

    /**
     * 树节点ID -> 子节点
     */
    private Map<Long, TreeNode> treeNodeMap;

    public TreeRich() {
    }

    public TreeRich(TreeRoot treeRoot, Map<Long, TreeNode> treeNodeMap) {
        this.treeRoot = treeRoot;
        this.treeNodeMap = treeNodeMap;
    }
}
